package org.ym.file.domain.model.node.common.upload;

/**
 * 一般下载
 * @author ym
 */
public class NormalDownload implements DownloadInterface{
    private static NormalDownload instance;

    /**
     * 获取实例
     * @return
     */
    public static NormalDownload getInstance(){
        if(instance == null){
            synchronized (NormalDownload.class){
                if(instance == null){
                    instance = new NormalDownload();
                }
            }
        }
        return instance;
    }
    @Override
    public FileDownloadResult download(FileDownloadCommand fileDownloadCommand) {
        return FileDownloadResult.builder().filePath(fileDownloadCommand.getFilePath()).build();
    }
}
